package cc.marcio.systems.seven.dao;

import org.hibernate.Criteria;
import org.hibernate.Session;
import org.hibernate.criterion.Expression;

import cc.marcio.systems.seven.model.Action;


@SuppressWarnings("serial")
public class ActionDao extends BaseDaoImpl<Action> implements BaseDao<Action> {

	protected ActionDao(Session session) {
		super(session);
	}

	@Override
	protected void addPropertiedToCriteria(Criteria criteria, Action example) {
		if(example.getPlanet() != null)
			criteria.add(Expression.eq("planet", example.getPlanet()));
		
	}
}